import logging
from redis import StrictRedis

class Config(object):
    DEBUG = True

    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@127.0.0.1:3306:information21'
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    REDIS_HOST = '127.0.0.1'
    REDIS_PORT = 6379
    REDIS_NUM = 1

    SESSION_TYPE = 'redis'
    SESSION_REDIS = StrictRedis(REDIS_HOST,REDIS_PORT,db=REDIS_NUM)
    SESSION_KEY = 'shfoglengojxogps'
    SESSION_USE_SIGNER = True
    SESSION_PERMANENT = False
    PERMANNET_SESSION_LIFETME = 86400


class DevelopmentConfig(Config):
    DEBUG = True
    LOG_LEVEL = logging.DEBUG


class ProductionConfig(Config):
    DEBUG = True
    LOG_LEVEL = logging.WARNING

config_dict = {
    'development':DevelopmentConfig,
    'production':ProductionConfig
}